import axios from '@/libs/api.request'

export const getSliderList = (pageId) => {
  return axios.request({
    url: 'Slider/getSliderList',
    method: 'post',
    data: {pageId}
  })
}

export const editSlider = ({id, title, imgUrl, type, linkUrl, sort, status}) => {
  const data = {
    id, title, imgUrl, type, linkUrl, sort, status
  }
  return axios.request({
    url: 'Slider/editSlider',
    data,
    method: 'post'
  })
}

export const getSliderDetail = (id) => {
  return axios.request({
    url: 'Slider/getSliderDetail',
    data: {id},
    method: 'post'
  })
}

export const delSlider = (id) => {
  return axios.request({
    url: 'Slider/delSlider',
    data: {id},
    method: 'post'
  })
}
